# -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from nameform.forms import MynameForm

def index(request):

	if request.method == 'POST':
		myname = request.POST.get('myname')
		massage = u'こんにちは、' + myname + u'さん'
		return HttpResponse(massage)
	else:
		form = MynameForm()
		return render_to_response('form.html', {
			'from': form,
		}, context_instance=RequestContext(request))

